export default function strToTime(time, another) {
    let date = time ? new Date(parseInt(time)) : new Date()
    // console.log(date)
    let year = (date.getFullYear()).toString()
    let month = (date.getMonth() + 1) < 10 ? "0" + (date.getMonth() + 1).toString() : (date.getMonth() + 1).toString()
    let day = date.getDate() < 10 ? "0" + (date.getDate()).toString() : (date.getDate()).toString()
    let hour = date.getHours() < 10 ? "0" + (date.getHours()).toString() : (date.getHours()).toString()
    let second = date.getSeconds() < 10 ? "0" + (date.getSeconds()).toString() : (date.getSeconds()).toString()
    let minute = date.getMinutes() < 10 ? "0" + (date.getMinutes()).toString() : (date.getMinutes()).toString()
    let nowtime = year+"-"+month+"-"+day+" "+hour+":"+second+":"+minute
    return nowtime
}